<?php $this->extend('template');?>

<?php $this->start('titre_page'); ?>
	<?php echo __('View Continent'); ?>
<?php $this->end(); ?>

<?php $this->start('titre'); ?>
	<h1><?php echo __('View Continent'); ?></h1>
<?php $this->end(); ?>

<div class="continents view">
	<h2>
		<?= $this->Html->link($continent['Continent']['name'], array(
			'controller' 	=> 'countries',
			'action' 		=> 'view',
			 $continent['Continent']['idcontinents'])); ?>
	</h2>
</div>

<div class="related">
	<h3><?php echo __('Related Countries'); ?></h3>
	<?php if (!empty($continent['Country'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Name'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php //his->Continent->locale = Configure::read('Config.language'); ?>
	<?php //debug($continent); ?>
	<?php foreach ($continent['Country'] as $country): ?>

		<?php //$this->Country=$country; ?>
		<?php //$this->Continent->Country->locale = Configure::read('Config.language'); ?>
		<tr>
			<td><?php echo $country['name']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'countries', 'action' => 'view', $country['idcountries'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'countries', 'action' => 'edit', $country['idcountries'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'countries', 'action' => 'delete', $country['idcountries']), null, __('Are you sure you want to delete # %s?', $country['idcountries'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>


